program test
  implicit none
  real :: a, b, add

  do
     write(*,*) 'a, b :'
     read(*,*) a, b
     if(a == 0 .and. b == 0) exit
     write(*,*) 'a+b=', add(a, b)
  end do
  
  write(*,*)  
end program test

function add(a, b)
  implicit none
  real :: add
  real, intent(in) :: a, b
  add = a + b
end function add
